package com.neusoft.elm.controller;

import com.neusoft.elm.po.Food;
import com.neusoft.elm.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/FoodController")
public class FoodController {
    @Autowired
    private FoodService foodService;
    @PostMapping("/listFoodByBusinessId")
    public Object listFoodByBusinessId(Integer businessId) throws Exception {
        List<Food> list = foodService.listFoodByBusinessId(businessId);
        return list;
    }
}
